Snapshot: Staff vs Faculty

source('utils/utils.R')
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
data <- read.csv('data/college_data.csv')
Y <- "Total.FTE.staff..DRVHR2018."
X <- "Instructional..research.and.public.service.FTE..DRVHR2018."  
ID <- "Institution.Name" 
SZ <- "Total..enrollment..DRVEF2018." 
carnegie <- "Carnegie.Classification..HD2018."
landgrant <- "Land.Grant.Institution..HDNo0Yes8."
sector <- "Sector.of.institution..HDPrivate0Public8."
regression <- linregression_traditional(data,X,Y,carnegie)

summary_reg <- summary(regression)
rsquared <- summary_reg$r.squared
coeffs <- summary_reg$coefficients

Use ggplot2 instead: nicer plots

foo <- ggplotRegression(data,Y,X,carnegie,sector,'US Doctoral Universities')
foo[[1]]

summary_reg <- summary(foo[[2]])
rsquared <- summary_reg$r.squared
coeffs <- summary_reg$coefficients

Use plotly to get an interactive plot!

ggplotly(foo[[1]], tooltip = c('id', 'enroll', 'x', 'y'))